<?php
/*
 * [JINYUN!] (C)2001-2099 Jinyunweb.com
 * This is NOT a freeware, use is subject to license terms
 * $Id: 2017-12-13 03:39:35 apple $
*/
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'main';
cfc('core')->checklogin('jy_jdpm/member.index/');
$return=array();
$return['channel'] = pdo_getall('jy_jdpm_goods_group',array('uniacid'=>$_SESSION['uniacid'],'pid' => 0),'','','paixu asc');
set_html('title','冻结列表-'.$this->plugin_setting('basic')['title']);
if($_RQ['op']=='main'){
	
	$membersinfo=pdo_get('jy_jdpm_member',array('uniacid'=>$_SESSION['uniacid'],'mid'=>$_SESSION['uid']));
	$return['info']=$membersinfo;
	$return['total']= number_format($membersinfo['wallet_pledge']-$membersinfo['wallet_pledge_freeze'],2,'.','');
	
	$params=array('uniacid'=>$_SESSION['uniacid'],);
	$params['mid']=$_SESSION['uid'];
	$pindex = max(1, intval($_RQ['page']));
	$psize = 100;
	$total='';
	$take=pdo_getslice('jy_jdpm_freezelog',$params,array($pindex,$psize),$total,$fields,'','createtime desc');
	$totalpage=ceil($total/$psize);
	$totalpage=intval($totalpage);
	foreach($take as &$v){
		$v['remarks']= $v['remarks'] ? $v['remarks'] : '缴纳保证金';
		$v['status'] = $v['status'] ==0 ? '冻结中' : ($v['status'] ==1 ? '已解冻' : '已出金');
		$v['createtime']=date('Y/m/d H:i:s',$v['createtime']);
	}
	$return['totalpage'] =$totalpage;
	$return['params']['page'] =$pindex;
	$return['list']=$take;
	exi($return);	
}